package com.dss.auto_deploy.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dss.auto_deploy.domain.AdmDockerRegistry;
import com.dss.auto_deploy.vo.AdmDockerRegistryVo;
import com.dss.auto_deploy.dto.AdmDockerRegistryAddDto;
import com.dss.auto_deploy.dto.AdmDockerRegistryPageDto;
import com.dss.auto_deploy.dto.AdmDockerRegistryUpdateDto;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
* @Description:docker仓库Service
* @author dongshoushan
* @date 2022-09-22 14:39:03
*/
public interface IAdmDockerRegistryService  extends IService<AdmDockerRegistry> {
    /**
    * 新增docker仓库
    * @param admDockerRegistryAddDto
    * @return
    */
    int insert(AdmDockerRegistryAddDto admDockerRegistryAddDto);

    /**
    * 修改docker仓库
    * @param admDockerRegistryUpdateDto
    * @return
    */
    int update(AdmDockerRegistryUpdateDto admDockerRegistryUpdateDto);

    /**
    * 批量删除docker仓库
    * @param ids
    * @return
    */
    void deleteBatch(Long[] ids);

    /**
    * docker仓库查询
    * @param dto
    * @return List<AdmDockerRegistry>
    */
    Page<AdmDockerRegistryVo> list(AdmDockerRegistryPageDto dto) throws InterruptedException;

    List<AdmDockerRegistry> getAll(String name);
    List<AdmDockerRegistry> getAll();

    /**
     * 离线安装docker仓库
     * @param
     */
    void install(String ids, String tempPath, MultipartFile registryFile, MultipartFile registryWebFile);

    /**
     * 重新启动注册表
     *
     * @param registryId 注册表主键id
     */
    void restartRegistry(Long registryId);
}
